package com.sfj.config;

import com.kaka.starter.swagger.service.SwaggerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author kaka
 * @Date 2025/5/1
 */
@Configuration
@EnableSwagger2
public class SwaggerConfig {

    @Value("${spring.application.name:domain-sfj}")
    private String appName;

    @Value("${project.authinterceptor:sfj-auth}")
    private String authinterceptor;

    @Value("${project.packagePath:com.kaka.gateway.controller}")
    private String packagePath;


    @Autowired
    private SwaggerService swaggerService;

    @Bean
    public Docket api() {
        return swaggerService.getDocket(appName,packagePath);
    }
}
